<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
        <style>
            /* .navbar{
                background: linear-gradient(to right, #74ebd5, #9face6);

            } */
        </style>
    </head>
    <body>
        <nav class="navbar navbar-expand-lg navbar-light bg-light">
            <div class="container-fluid">
                <a class="navbar-brand" href="#">fieemiracle</a>
                <button class="navbar-toggler" type="button"
                    data-bs-toggle="collapse"
                    data-bs-target="#navbarSupportedContent"
                    aria-controls="navbarSupportedContent" aria-expanded="false"
                    aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>
                <div class="collapse navbar-collapse"
                    id="navbarSupportedContent">
                    <ul class="navbar-nav me-auto mb-2 mb-lg-0">
                        <li class="nav-item">
                            <a class="nav-link active" aria-current="page"
                                href="http://localhost:3000/signup">主页</a>
                        </li>
                        <li>
                            <a class="nav-link active"
                                href="https://juejin.cn/user/3316551988553709/posts">掘金</a>
                        </li>
                        <li>
                            <a class="nav-link active"
                                href="https://leetcode.cn/u/fieemiracle/">力扣</a></li>
                        <li>
                            <a class="nav-link active"
                                href="https://gitee.com/fieemiracle">Gitee</a></li>
                    </ul>
                    {% if ctx.session.user %}
                    <form class="d-flex" role="search">
                        <input class="form-control me-2" type="search"
                            placeholder="Search" aria-label="Search">
                        <button class="btn btn-outline-success" type="submit">Search</button>
                    </form>
                    <div class="btn-group" style="margin: 0 1rem;">
                        <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" data-bs-display="static" aria-expanded="false">
                          {{ctx.session.user.name}}
                        </button>
                        <ul class="dropdown-menu dropdown-menu-end">
                          <li><a class="dropdown-item" href="/create">写文章</a></li>
                          <li><a class="dropdown-item" href="#">个人主页</a></li>
                          <li><a class="dropdown-item" href="#">归档</a></li>
                          <li>
                            <hr class="dropdown-divider">
                          </li>
                          <li>
                            <a class="dropdown-item" href="/signin">退出</a>
                          </li>
                        </ul>
                      </div>
                    {% else %}
                    <div class="btn-group" role="group" aria-label="Basic mixed
                        styles example">
                        <a href="/signup" class="signup">
                            <button type="button" class="btn btn-info">注册</button>
                        </a>
                        <a href="/signin" class="signin">
                            <button type="button" class="btn btn-success">登录</button>
                        </a>
                    </div>
                    {% endif %}
                </div>
            </div>
        </nav>
    </body>
</html>